{extend name="$BASE_LIST" /}
{block name="body"}
<link rel="stylesheet" type="text/css" href="__STATIC__/monthPicker/dateRange.css"/>
<link rel="stylesheet" type="text/css" href="__STATIC__/monthPicker/monthPicker.css"/>

<div class="right-main">
    <div class="page_nav" id="js_page_nav"><span class="page_title">{$page_nav}</span></div>

    <div id="js_main_header" class="ui-form main_header">

        <span class="frm_input_box search append">
            <a href="javascript:void(0);" id="js_search" class="frm_input_append">
                <i class="icon wb-search" title="搜索"></i>
            </a>
            <input type="text" id="js_keyword" placeholder="请输入用户名称或手机号或hash串" value="" class="frm_input"/>
        </span>

        <span class="right">
        </span>
    </div>
    <table id="grid-table">
        <thead frozen="true">
        <th data-options="field:'username',width:100,align:'center'">用户名称</th>
        <th data-options="field:'phone',width:130, align:'center'">手机号</th>
        </thead>
        <thead>
        <tr>
            <th data-options="field:'txid',width:520,align:'center', ">hash串</th>
            <th data-options="field:'amount',width:120,align:'center', ">转账金额</th>
            <!-- <th data-options="field:'from',width:120,align:'center', ">来自</th> -->
            <!-- <th data-options="field:'to',width:120,align:'center', ">用户状态</th> -->
            <th data-options="field:'times',width:120,align:'center', ">转账时间</th>
        </tr>
        </thead>
    </table>
</div>

{/block}
{block name="script"}
<script type="text/javascript" src="__STATIC__/monthPicker/dateRange.js"></script>
<script type="text/javascript" src="__STATIC__/monthPicker/monthPicker.js"></script>
<script type="text/javascript">


    $(function () {
        $('#grid-table').datagrid({
            url: getURL('btcloadList'),
            method: "GET",
            height: getGridHeight(),
            rownumbers: true,
            singleSelect: true,
            remoteSort: false,
            multiSort: true,
            emptyMsg: '<span>无相关数据</span>',
            pagination: true,
            pageSize: 20
        });
        //设置分页控件
        $('#grid-table').datagrid('getPager').pagination({
            pageSize: 20, //每页显示的记录条数，默认为10
            pageList: [20, 30, 50]
        });
    });


    $("#js_search").click(function () {
        reload();
    });

    $("#js_expBtn").click(function () {
        location.href = getURL('export');
    });

    function reload() {
        var keyword = $("#js_keyword").val();
        $('#grid-table').datagrid('reload', {
            keyword: keyword,
        });
    }


</script>
{/block}